<template>
  <div>

    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="用户名">
        <el-input v-model="formInline.username" placeholder="用户名"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input v-model="formInline.password" placeholder="密码" show-password></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="login">查询</el-button>
      </el-form-item>
    </el-form>



  </div>
</template>

<script>
export default {
  name: "LoginView",
  data() {
    return {

      formInline:{},



    }
  },
  methods:{


    login() {
      this.axios.post("/user/user/login", this.formInline)
          .then(res=>{
            if (res.data.code == 200) {
              this.$message.success(res.data.msg);
              this.$router.push("/contract");
            } else {
              this.$message.error(res.data.msg);
            }
          })
    }
  },
  created() {

  }
}
</script>

<style scoped>

</style>